Create database ATMmanager
go
use ATMmanager
go 
Create table Khachhang
(
	CustomerID int primary key,
	CustomerName nvarchar(30) not null,
	Birth datetime not null,
	PhoneNumber nvarchar(20) not null,
	Address nvarchar(50) not null,
	MaPin varchar(10)not null,
	Sothe varchar(30),
	Sotaikhoan varchar(30)
)
select * from Khachhang
go
Create table Taikhoan
(
	Sotaikhoan varchar(30)primary key,
	loaitaikhoan nvarchar(30),
	Sodutaikhoan float,
	GiaodichID int,
	Khachhang 
)	
go 
Create table Giaodich
(
	GiaodichID int primary key,
	Ngaygiaodich datetime,
	Thoigiangiaodich time,
	Loaigiaodich nvarchar(30),
	Sotien float,
	Sodu float,
	sotaikhoan 
)
Create table MayATM
(
	ATMid int,
	Diachi nvarchar(30),
	Trangthai nvarchar(20),
	Sotienhientai float
)
